const mongoose = require('./../db')
const Schema=mongoose.Schema

const schema = new Schema({
    proid: { type: String, required: true },
    category: { type: String, required: true },
    brand: { type: String, required: true },
    proname: { type: String, required: true },
    banners: { type: Array, required: true },
    originprice: { type: Number, required: true },
    sales: { type: Number, required: true },
    stock: { type: Number, required: true },
    desc: { type: String, required: true },
    issale: { type: Number, required: true },
    isrecommend: { type: Number, required: true },
    discount: { type: Number, required: true },
    isseckill: { type: Number, required: true },
    img1: { type: String, required: true },
    img2: { type: String, required: true },
    img3: { type: String, required: false }, 
    img4: { type: String, required: true },
  })

  module.exports=mongoose.model('Product',schema)